package cn.xdf.learn.leetcode;

public class CodeGenerate {

    static char[] word = new char[]{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
            'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'u', 'v', 'w', 'x', 'y', 'z',
            '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};

    public static void main(String[] args) {


        for (int i = 0; i < 6; i++) {
            StringBuilder sb = new StringBuilder();
            for (char c : word) {
                sb.append(c);


            }
            System.out.println(sb.toString());


        }


    }

    public static void thread() {
        //产生第1个字母
        for (int i = 0; i <= 35; i++) {

            new Thread(new Runnable() {
                @Override
                public void run() {
                    //产生第2个字母
                    for (int j = 0; j <= 35; j++) {
                        //password[1] = word[j];
                    }
                }
            }).start();

        }


    }


    private String assemble1(StringBuilder sb, int length) {
//        for (int i = 0;i <= 35;i++) {
//
//
//
//        }

        return null;
    }


    public static void single() {
        char[] password = new char[6];
        //产生第1个字母
        for (int i = 0; i <= 35; i++) {
            password[0] = word[i];
            //产生第2个字母
            for (int j = 0; j <= 35; j++) {
                password[1] = word[j];
                //产生第3个字母
                for (int k = 0; k <= 35; k++) {
                    password[2] = word[k];
                    //产生第4个字母
                    for (int l = 0; l <= 35; l++) {
                        password[3] = word[l];
                        //产生第5个字母
                        for (int m = 0; m <= 35; m++) {
                            password[4] = word[m];

                            //产生第6个字母
                            for (int n = 0; n <= 35; n++) {
                                password[5] = word[n];
                                System.out.println(new String(password));
                            }
                        }

                    }
                }
            }

        }
    }


}
